<template>
  <div id="app">
    <navigation>
      <!-- 内容注入区 -->
      <router-view />
    </navigation>

    <!-- confirm框 -->
    <Confirm
      :show="confirm.show"
      :msg="confirm.msg"
      :btnList="confirm.btnList"
      :clickModalToClose="confirm.clickModalToClose"
      @close="confirm.show = false"
    ></Confirm>

    <!-- loading -->
    <Loading
      :show="loading.show"
      :loadingColor="loading.color"
    ></Loading>

    <!-- tips -->
    <Tips
      :show="tips.show"
      :msg="tips.msg"
      :type="tips.type"
      :icon="tips.icon"
    ></Tips>

    <!-- 底部备案号 -->
    <!-- <div class="zx_beian">
      <div>
        ©苏州企业征信服务有限公司 2022版权所有
      </div>
      <p>苏ICP备15009858号-8</p>
    </div> -->
  </div>
</template>
<script>
import { mapState } from "vuex";
import Confirm from "@/components/common/ui/Confirm";
import Loading from "@/components/common/ui/Loading";
import Tips from "@/components/common/ui/Tips";
export default {
  name: "App",
  components: {
    Confirm,
    Loading,
    Tips,
  },
  data () {
    return {};
  },
  computed: {
    ...mapState({
      // confirm
      confirm: (state) => state.ui.confirm,
      // loading
      loading: (state) => state.ui.loading,
      // tips
      tips: (state) => state.ui.tips,
    }),
  },
  watch: {
    $route () {
      // 页面切换，关闭confirm
      this.confirm.show = false;
    },
  },
  methods: {},
};
</script>
<style lang="scss">
@import "@/assets/css/global/main.scss";

.zx_beian {
  display: flex;
  justify-content: space-between;
  position: fixed;
  left: 32px;
  bottom: 0;
  right: 32px;
  z-index: 999;
  font-size: 9px;
}
</style>
<style lang="scss" scoped></style>
